package cn.net.xyan.easy.webapp.base.service;

import org.springframework.data.domain.Page;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * Created by zarra on 16/2/23.
 */
public interface IDTOService {
    <R,E> R convert(Class<R> responseCls,E entity,Map<String,Object> context);
    <R,E> R convert(Class<R> responseCls,E entity);

    <R,E> List<R> convert(Class<R> responseCls, Collection<E> entities);
    <R,E> Page<R> convert(Class<R> responseCls,Page<E> entities);
}
